﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Reports.aspx.cs" Inherits="KnowFirstWebApplication.Reports" EnableSessionState="ReadOnly" MaintainScrollPositionOnPostback="True" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
<%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server" >
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="CategoriesTitle" style="vertical-align: middle; text-align: right" >
    <h3 dir="rtl" style="color: #996633" >דו"חות:</h3>
    </div>
    <div id="report" >
  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
  <ContentTemplate>
    <div id="queriesAndCategories" >
     <table dir="rtl" >
            <tr>
                <td>
                   <div id="categorySelection"  class="querySelectionDivs">
        <asp:Label ID="Label1" runat="server" Text="בחר קטגוריה"></asp:Label><br />
            <asp:ListBox id="lbCategories" runat="server" Width="180px" Height="110px" 
                           AutoPostBack="True" onselectedindexchanged="lbCategories_SelectedIndexChanged">
		</asp:ListBox>
       
    </div>
    </td>
                <td>
                   <div id="querySelection"  class="querySelectionDivs">
        <asp:Label ID="Label2" runat="server" Text="בחר נושא" ></asp:Label><br />
            <asp:ListBox ID="lbQueries" runat="server" Width="180px" Height="110px" ></asp:ListBox>
             
    </div>
    </td>
                <td>
                   <div id="TopicAddRemoveButtons" class="querySelectionDivs">
   	    <asp:Button name="btnAdd" Text="הוסף" runat="server" style="width: 55px" ID="btnAddQuery" 
                      onclick="btnAddQuery_Click"/><br />
   	    <asp:Button name="btnRemove" Text="הסר " runat="server" style="width: 55px" 
                      ID="btnRemoveQuery" onclick="btnRemoveQuery_Click" />
   	      </div>
   	      </td>
                <td>
                  
   	      <div id="selectedQueries" class="querySelectionDivs">
   	      <asp:Label ID="Label3" runat="server" Text="נושאים נבחרים"></asp:Label><br />
                 <asp:ListBox ID="lbSelectedQueries" runat="server" Width="180px" Height="110px" ></asp:ListBox>
   	      </div></td>
            </tr>
        </table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<div id="pre-results" style="margin-top: 20px; margin-bottom: 20px;"  dir="rtl"  >
     <asp:CheckBoxList runat="server" id="cblDocumentTypes" RepeatDirection="Horizontal" 
                    Height="16px" Width="315px" 
            
            AutoPostBack="True"></asp:CheckBoxList>
            <span id="dateSelect"  
            style=" word-spacing: 0.5em; line-height: normal;">
        <asp:Label ID="Label4" runat="server" Text=" מתאריך "></asp:Label>
        <asp:DropDownList ID="cbFromYear" runat="server"/>
        <asp:DropDownList ID="cbFromMonth" runat="server"/>
        <asp:DropDownList ID="cbFromDay" runat="server"/>
        <asp:Label ID="Label5" runat="server" Text=" עד "></asp:Label>
        <asp:DropDownList ID="cbToYear" runat="server"/>
        <asp:DropDownList ID="cbToMonth" runat="server"/>
        <asp:DropDownList ID="cbToDay" runat="server"/>
		
		<asp:Button id="btnLoadCategory" runat="server" Text='הצג דו"ח'        Width="121px" onclick="btnLoadCategory_Click" 
                   />
        </span>
        <br /><br />
    <asp:Label ID="lblCategoryName" runat="server"></asp:Label>
    
    </div>
    <div id="reportspace">
        <asp:Chart ID="chartMentionsByDate" runat="server" Width="693px" >
        
            <series>
                </series>
            <chartareas>
            
                <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
									<area3dstyle Rotation="10" Perspective="10" Inclination="15" IsRightAngleAxes="False" WallWidth="0" IsClustered="False" />
									<axisy LineColor="64, 64, 64, 64" IsLabelAutoFit="False" IsStartedFromZero="False">
										<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
										<MajorGrid LineColor="64, 64, 64, 64" />
									</axisy>
									<axisx LineColor="64, 64, 64, 64" IsLabelAutoFit="False">
										<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" Interval="Auto" Format="MMM dd" />
										<MajorGrid LineColor="64, 64, 64, 64" />
									</axisx>
								</asp:ChartArea>
            </chartareas>
        </asp:Chart>
        <asp:SqlDataSource ID="dsMentionsByDate" runat="server" 
            ConnectionString="<%$ ConnectionStrings:KnowFirstConnectionString %>" 
            SelectCommand="get_mentions_by_date" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:SessionParameter DefaultValue="Roeyaus" Name="user_name" 
                    SessionField="UserName" Type="String" />
                <asp:ControlParameter ControlID="lbSelectedQueries" 
                    DefaultValue="ðùéà àøöåú äáøéú" Name="query_text" PropertyName="SelectedValue" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </div>
</div>

</asp:Content>
